<% content_for :left_sidebar do  %>
  <%= render :partial => "layouts/sidebar/xiwenguanli" %>
<% end %>

<%- model_class = News -%>
<div class="page-header">
  <h1>稿件详情</h1>
</div>

<dl class="dl-horizontal">
  <dt><strong>主标题:</strong></dt>
  <dd><%= @news.title %></dd>
  <dt><strong>副题:</strong></dt>
  <dd><%= @news.bottomtitle %></dd>
  <dt><strong>肩标:</strong></dt>
  <dd><%= @news.uptitle %></dd>
  <dt><strong>作者:</strong></dt>
  <dd><%= @news.writer %></dd>
  <dt><strong>摄影师:</strong></dt>
  <dd><%= @news.cameraman_name %></dd>
  <dt><strong>联系电话:</strong></dt>
  <dd><%= @news.phone %></dd>
  <dt><strong>来稿单位:</strong></dt>
  <dd><%= @news.contribution_units %></dd>
  <dt><strong>发稿人:</strong></dt>
  <dd><%= @news.postby %></dd>
  <dt>正文</dt> 
  <dd><%=raw @news.body %></dd>
  <dt>&nbsp;</dt>
  <dd>&nbsp;</dd>
  <dt></dt>
  <dd>
    <%= form_tag reject_admins_news_path do %>
        <% if @news.check == 0 && @news.postby == current_user.name %>
            <a class="btn btn-primary" href="/admins/news/<%= @news.id %>/submit">
                <span class="translation_missing" title="translation missing: zh-CN.helpers.links.new">
                    确认送审
                </span>
            </a>
        <% end %>
        <%= link_to '返回',admins_news_index_path,:class => 'btn btn-info' %>
        <% if News.can_approve?(@news,current_user) %>
            <a class="btn btn-primary btn-success" href="/admins/news/<%= @news.id %>/approve">
              <span class="translation_missing" title="translation missing: zh-CN.helpers.links.new">
                确认采用
              </span>
            </a>
            <%= hidden_field_tag :id,@news.id %>
            <%= submit_tag '确认不采用',:class => 'btn btn-primary btn-danger' %>
            <div style="margin-top: 5px;">
                <%= must_label %>如果不采用,请填写不采用原因:
                <%= text_field_tag :reason,'',required: "required" %>
            </div>
        <% end %>
    <% end %>
  </dd>
</dl>
